A Modified ResNeXt for Android Malware Identification and Classification

It is critical to successfully identify, mitigate, and fight against Android malware assaults, since Android malware has long been a significant threat to the security of Android applications. Identifying and categorizing dangerous applications into categories that are similar to one another are especially important in the development of a safe Android app ecosystem. The categorization of malware families may be used to improve the efficiency of the malware detection process as well as to systematically identify malicious trends. In this study, we proposed a modified ResNeXt model by embedding a new regularization technique to improve the classification task. In addition, we present a comprehensive evaluation of the Android malware classification and detection using our modified ResNeXt. The nonintuitive malware's features are converted into fingerprint images in order to extract the rich information from the input data. In addition, we applied fine-tuned deep learning (DL) based on the convolutional neural network (CNN) on the visualized malware samples to automatically obtain the discriminatory features that separate normal from malicious data. Using DL techniques not only avoids the domain expert costs but also eliminates the frequent need for the feature engineering methods. Furthermore, we evaluated the effectiveness of the modified ResNeXt model in the classification process by testing a total of fifteen different combinations of the Android malware image sections on the Drebin dataset. In this study, we only use grayscale malware images from a modified ResNeXt to analyze the malware samples. The experimental results show that the modified ResNeXt successfully achieved an accuracy of 98.25% using Android certificates only. Furthermore, we undertook extensive trials on the dataset in order to confirm the efficacy of our methodology, and we compared our approach with several existing methods. Finally, this article reveals the evaluation of different models and a much more precise option for malware identification.


Introduction
Malware has many different definitions specified by different scholars and researchers depending on the attack vector deployed or harm caused. However, all researchers agreed on the same meaning in general, that is, malware applications have an evil intent [1]. Malicious software (malware) is any software with malicious intent. Malicious code is designed to disrupt normal functioning, display unwanted advertising, control the user's device without their awareness or knowledge, steal or gather sensitive information, and delete or encrypt important data [2]. Unintentionally, harmful software and malware are collectively referred to as "bad ware." e newly developed malware, which is very sophisticated, can obstruct emulators and elude deep static analysis. Malware can also be spread through metamorphic techniques such as instruction permutation, registry modification, encryption, antidebugging, multipacket, virtual machines, and code transformation. It has the capability to launch the payload intelligently to evade detection techniques [3][4][5][6][7]. Many new variants of malware can be generated using automation and reused development modules [8][9][10]. Like computer systems, malware systems have evolved enormously to be smarter, more intelligent, and more decisive. e main categories of malware are botnets, ransomware, viruses, rootkits, worms, and Trojans [10].
Malware can avoid detection by using polymorphic and metamorphic techniques [3,[11][12][13]. Malware developers frequently modify minor portions of the original source code in order to create new variants and avoid detection [9,14,15]. is makes it extremely difficult to distinguish malware variants from the same family [16,17].
Malicious Android applications can infiltrate smartphones to be able to do anything without the user's knowledge, such as stealing information, blocking access to critical information from the device, or even mine cryptocurrency. Currently, the rate shows an incredibly high increase in Android malware samples (malicious Android apps) and their variants keep proliferating.
e McAfee mobile threat report in Q1 2020 [18] announced that the size of new detected malware attacks reached 800,000 in the 4th quarter of 2019, exceeding the previous quarter of 35 million malware attacks.
Some of these attacks are not easy to detect since the attacker mimic the same normal behavior. For example, the attackers develop a new malware, named MalBus, to avoid any detection by using the original developer's Google Play account.
Moreover, the attacker can collect sensitive military and political information using scannable devices as well as target Google account login information using a phishingstyle fake login page. Besides, a new Android malware family (i.e., LeifAccess), which is also known as Shopper, works by exploiting accessibility advantages to create accounts and post fake reviews on the Play Store. After installing it, it promotes click fraud without displaying an icon or a shortcut. As a result of the rising threat from an ever-increasing number of mobile malware instances and new malware families emerging, the Android ecosystem's security will be affected. In order to combat this threat and protect mobile users and systems [19,20], many studies have been conducted to look for ways to detect and classify Android malware samples. As follows, there are many problems related to the classification and detection of malware: the problems of binary classification in which an app's malignancy is attempted to be determined, multiclass classification problems that include attempting to classify detected malicious apps into a known or unknown family, which is related to identifying malware families, and many others. So, malware researchers should be focusing their attention on the most dangerous families instead of focusing on individual malware samples or lower-risk families if samples are correctly classified and accurately characterized [19]. As a result, an effective malware family classification can assist malware analysts in identifying more malware samples by recognizing and understanding the characteristics of other malware samples in a family. On the other hand, there is a more challenging task than malware detection, which is the classification of malware families. e reason for that is that the numbers of malware samples vary extremely between different families [19][20][21][22].
Windows malware families have been the subject of several malware classification studies [9,17,[23][24][25]. Due to the different structures and characteristics between Windows malware and Android malware, it is not applicable to utilize the same methodologies to categorize Windows malware families for Android malware families [25,26]. Consequently, Android malware samples and variations have recently received a lot of attention from academics and the industry.
A recent publication [27] sheds light on the advancement of malware detection through the use of the ResNeXt model. is advancement is due to the architecture of the model, which combines the features of the ResNet and InceptionNet architectures. In addition, it requires low flops and applies the skip concept from ResNet architecture. Motivated by this fact, we proposed a modified ResNeXt model for Android malware classification.
e proposed model operates on raw bytes, obviating the need for decryption, disassembly execution of code, and reverse engineering in order to identify malware. To extract the quality information, we converted the malware's nonintuitive features into fingerprint images. Seeing through malware binary, we evaluated the performance and generation of the proposed model to view the capability of discovering and extracting insights necessary for malware analysis and to pave the path for the development of effective malware classification systems. e main contributions of this work are enumerated as follows: (i) Proposes an effective modified ResNext classification network for automatically classifying Android malware families from raw malware samples. e Drebin dataset was used to test and validate the proposed system. is dataset contains 5560 applications from 179 different malware families.
(ii) Investigates fifteen different combinations of Android malware file structures in order to classify and generate malware images. In addition, we observed that CR combination of malware image is the most suited feature for malware identification and classification.
(iii) We extract composite features by designing a modified ResNext with a new regularization technique. In particular, we used the standard deviation of the weight matrix to create an adaptive weight decay form in order to prevent the model from taking values. e rest of this study is organised as follows: Section 2 provides a brief background about the structure of the API files, CNN, deep residual networks, and regularization techniques. Section 3 provides an in-depth view of the existing promising countermeasures that have been produced to monitor and detect Android malware categories. e dataset analysis, methodology, and proposed model are described in Section 4. Section 5 discusses the experimental results and analysis, while an overall discussion of this research and the limitations are introduced in Section 6. Finally, the study' conclusion is discussed in the last section.

Background Theory
is section provides a brief background to introduce the structure of the API files and other classifiers and regularization techniques, which are applied for our classification problem.
2.1. Structure of APK Files. Android has become one of the most popular operating systems for smartphones. Since the Android operating system is open source, cybercriminals are attracted to using it.
is section goes over the Android application, common Android malware families, Android malware analysis, and Android malware detection techniques. Generally, Android applications are mainly written using the Java programming language and then gather data and source files into an archive file called the Android application package (APK) (Android package) [28]. e APK is shared in the application market and is used for the installation of applications. However, the APK is a ZIP file consisting of multiple files, making it necessary to unzip it before use [29]. e Android APK structure is shown in Figure 1, and the details of each file and folder component are given in Table 1.
Malware families are groups of malwares with similar characteristics, behavior, and capabilities, such as stealing information from a location or a remote server, sending paid or malicious SMS messages, and so on. Malicious behavior uses the same package names as the attack for injecting a payload. In addition, the identity (signature) of a group of malwares (family) can be determined by repeating the use of package names (or other common characteristics) [19]. e most common malware families are given in Table 2 [18].
A significant amount of time is required to manually create features throughout the Android package (APK) structure for Android malware family classifications [3,4,30,34,35]. ese safety mechanisms require significant computer resources, and their deployment in a restricted smartphone environment is challenging [31]. Android malware traces have been studied through classes.dex (CL), resource (RS), manifest, and Android application certificate (CR) files. Malware detection technology, as well as malicious code, have both been developed over time. It is necessary to analyze malware in order to be able to detect it. ere are several methods for analyzing and classifying malware, including static, dynamic, hybrid, visualization (image), and audio [32,33]. Static analysis and classification are the most common methods. Antimalware signatures and behavioral techniques such as static and dynamic analyses are the most important techniques for identifying malware. Intelligent malware, on the other hand, employs dynamic analysis in conjunction with antiemulation technology [28,31,36]. In order to use dynamic and static techniques on such files, a significant amount of manual effort or human intervention is required. To reverse engineer or analyze an application, it is necessary to have prior knowledge of the domain [29,[37][38][39][40]. Table 3 provides a comparison between two types of analysis, which are static and dynamic analyses.
However, the dynamic approaches experienced with false-positive rates can hinder their wild deployment in real applications. In general, dynamic malware detection is resilient to metamorphic and polymorphic malwares. However, they are slow, resource-consuming, and vulnerable due to the limitation of code reachability. Hence, they may be including a false positive rate. In practice, the weight value for each feature of an application indicates how significant the feature contributes to the classification result in the model pool that participates in the weighted voting that derives the classification result for the application. So, the abnormal feature values in terms of sensitive access might cause some benign apps to be falsely classified as malware.
us, we can see the dynamic methods are not sufficient and scalable to trace many malicious apps. Moreover, since malware coders have more experience using traditional detection and classification techniques, it will be easier for them to create new malware that can circumvent the current security mechanism. For this reason, researchers have been working for the past few years to develop a new, faster method of automatically detecting, visualizing, and classifying malware. In 2011, Nataraj et al. [24] proposed a completely new approach to malware visualization and analysis using the image processing concept. is is done by visualizing the malware as binary images, extracting its features, and then classifying it. However, the system classifies malware into different families based on whether it has the same visual features, similar texture, and similar structure as malware belonging to another family [2]. is technique overcomes several limitations inherent in static and dynamic analyses. is motivates us to focus on visualbased analysis as it provided a new direction for deploying convolutional neural network (CNN) algorithms for the purpose of detecting malicious software effectively. e images generated by the visualization approach have a variety of layouts, styles, and forms.
us, malware images have distinct visual similarities and characteristics that set them apart from benign images, which are distinguished by a variety of distinct stripes. ese striking distinctions in the visual characteristics of acquired benign and malware images help us classify them according to their families.  Computational Intelligence and Neuroscience

Reference
APK folders/files Responsibilities [30][31][32][33] AndroidManifest.xml It is one of the most important files in the Android application, which stores the basic information for the applications and includes the app components, such as activities, services, broadcast receivers, content providers, and others, in addition to package information, such as permissions, package name, and app ID. It also reveals the SDK version.
Assets/folder e assets include the assets of an application directory, like images and files, which can be put in this folder and accessed by the asset manager object to retrieve the application assess detailed in the assets folder.
Lib/folder is folder contains the native code libraries. e software layer of a processor relates to a specific type of gather inside in this folder.
META-INF/folder is includes three main files, which are the signatures certifications, and manifest files for the APK such as MANIFEST.MF, SF, and * . RSA.
Res/folder is folder includes a description of the resources such as icons, music, images, string, resources, and layouts. ese resources are not compiled in resources, arsc folder.

Classes.dex
Dex code represents bytecode for Android applications which is generated after the compilation of the Java code. which contains multiple constructs for all classes composed like file header, string table, local variable list, class definition table, and method list and can be understandable by the Dalvik virtual machine. Any change in the dex file will affect the APK.

Resources.arsc
is includes an application's resources in a binary format, like strings, styles, and the paths of images or layouts files, which are a part of this content. However, the data can only be processed in an XML format.
significantly increases the number of training parameters, and this can increase the complexity of the classifier. e CNN produces the concept of parameter sharing in each layer to solve the limitations of the traditional NN and reduce the explosion of weight vectors. e weight sharing concept of the CNN can reduce the computational cost and the training time of the model classifier compared to the other DL models. e CNN is constructed from three core layers, i.e., convolution, pooling, and fully connected layers [48]. e simple architecture of the CNN is shown in Figure 1. e convolution layer is produced as a result of the linear operation of the kernel or filter with the previous output layer. e Relue activation function is widely used in the CNN to increase the degree of nonlinearity and to remove also all negative values of feature maps. e CNN can include more than a convolutional layer. e first layer is used to capture the simple features such as corners or edges. While, the higher layers are mainly used to learn the high-level features. e CNN does not only have the capability to extract the discriminatory features from the input data but can also reduce the spatial size of the convolved feature through the pooling layers. e CNN is implemented in several available architectures, such as ZFNet [49], ResNet [50], GoogLeNet [51], VGGNet [52], AlexNet [53], and LeNet [54]. Motivated by the success of the CNN in various application domains, we utilize the CNN for Android malware detection. e parameters' sharing and the concept of dimensionality reduction are the factors that inspired us to use the CNN for the detection problem.

Deep Residual Networks. In 2016, Microsoft Research
Lab [55] released the deep residual network to solve the inherent problems of traditional deeper networks. e traditional models are more difficult to train and exposed to the degradation problem (of training accuracy). Adding new  Table 3: Compare between static and dynamic analyses.

Static Dynamic
How it works e suspected code is analyzed without the application being run during static analysis. is method involves disassembly of source code and analyzing it to check the presence of malware without executing the source code and depend only on malware abstraction characteristics and application byte code. Mostly, reengineering is applied [41][42][43].
e suspected code is analyzed during the runtime execution. It focuses on the characteristics and traces of suspicious use during implementation [24][25][26][44][45][46]and also focuses on system calls and application programs. It is a cybernetic environment used for the execution of code.

Advantage
Harmful applications are not needed to be installed on the device.
It can detect dependencies that are impossible to detect in the static method. Do not execute or run the malware code.
Collects temporal instructions. Applications are in format APK or archive in a zip package [41][42][43].
Deals with real data, whereas. in the static analysis, you cannot know input files to be passed for analysis. It can overcome string detection issues, such as malware fitting and pleomorphism [41][42][43].
Disadvantage is technique does not take into consideration the analysis of unknown malware.
Can have a negative performance impact on the application. e source codes used are not directly available, and it must be disassembled to extract the features [16][17][18][19][20][21]. Requires better mobile security at critical monitoring stages.
Harmful applications cannot appear until the code has been run.
It can give incorrect results for similar behavior of the malicious applications with staring applications.
Suffers from code obfuscation [9,17,22,23]. It is a complex and time-consuming technique that requires high resource usage and storage capacity [22,47].
Computational Intelligence and Neuroscience layers to the deeper networks not necessarily improves the training accuracy. In most cases, the accuracy becomes saturated and will degrade rapidly with increasing of the network depth, and this can lead to high training errors. On the other hand, the deep residual network works to overcome the aforementioned limitations by using the residual blocks. e simple structure of residual building block is shown in Figure 2. e potential of this type of networks lies on the concept of "skip connections" to improve the accuracy of the models. Instead of the consecutive connections of the layers in the neural network, some of the layers are skipped and feed the output of one layer as the input to the next layers. e residual blocks are stacked together in a sequential way to consist the residual. e identity mapping of deep residual is descried according to the following formula: where F is the residual function, W i is the wight parameters of the block, and X i and X i+1 represent the input and output of the i th unit in the network. In recent days, the deep residual approved its robustness in several computer vision applications. Motivated by its successfully achieved results in different tasks, we also utilized deep residual in this article for Android Malware detection.

Regularization: A Method of Controlling the Model from Complexity.
One of the big challenges in machine learning is how to build a more robust model that can perform effectively in the training data and the new testing data as well. However, the overfitting is one of the significant problems that can hinder the normal operation of machine learning techniques. e model can perform very well during the training, but unfortunately, it performs very poor in the new testing samples, which eliminates its wild implementation for zero-day attacks. e reason behind that returns to the complexity of the training model, resulting from large number of training parameters. As a result, the model can learn the noise in the input data as specific features to discriminate between different attack classes. To eliminate this problem and reduce the error of the prediction model, we can use regularization techniques. e key idea behind the regularization methods is to penalize the model by dropping some of its weight parameters, and this can increase the model's performance on unseen data detection.
ere are many several techniques widely used for the regularization process. L1 and L2 are the most two popular regularizer methods and comprehensively used in the domain area of machine learning [56]. In the following subsections, we will discuss these two methods in detail.

L1 or Lasso Regularizer.
In the L1 regularizer, the absolute value of the magnitude is added to the new loss function. Penalizing the model with the absolute value will make the weight parameters of the insignificant features to reach to zero. As a result, these features will be ignored totally from the model training, i.e., are not contributing any more for the classifier's boundaries. So, we can find the L1 regularizer is widely used for feature selection purposes to selectively reduce or eliminate unnecessarily features [56]. e L1 regularizer is denoted mathematically as follows.
where λ is the new hyperparameter used for regularization, n represents the number of features in dataset, and w gives the weight values of each feature.

L2 or Ridge Regularizer.
In the L2 regularizer [56], we added the square value of the magnitude to the new loss function instead of the absolute value like in L1. us, the weight of less important features will reach close to zero but never reach digit zero itself, i.e., the weight matrix will remain greater than zero. L2 regularizer provides better performance with low loss compared to L1. Since, it considers all features during the training process [57]. e mathematical notation of the L2 regularizer is discussed in the following equation: e λ is the hyperparameter parameter and used to impose an additional penalty on the corresponding weight values and n and w represent the number of features and the coefficient value of each feature, respectively.

New Regularizer.
As we explained in the aforementioned section above, the L1 regularizer is widely used for feature selection, while the L2 regularizer gives less importance to less significant features. However, both regularizers have substantial drawbacks and inherit some limitations, which hinder their broad use to detect zero-day threats. Unfortunately, L1 and L2 regularizers do not take into account the relationship between entries in a weight  Computational Intelligence and Neuroscience matrix. In other words, they only deal with individual weight values. However, any change in the feature attributes, even a small change, can cause a big difference in the model performance. To solve this problem, we developed a new regularizer method (SD-Reg) based on the standard deviation to efficiently deal with the weight values' dispersion, i.e., the SD-Reg regularizer restrains the learning model of using a diapered range of weight space. It works to create a weight-decay adaptive form by considering the standard deviation of a weight matrix and multiplies it by λ parameter to obtain its regularization term. It is shown in equations (3)-(5) how to formulate the new regularizer.
where σ indicates the standard deviation of the following weight values: For each row of the weight matrix, there are k rows; each row corresponds to an individual weight. Whereas, σ stands for the standard deviation's weighted averages. n is the number of columns in each i th row of the weight matrix, which is controlled by the parameter λ. e weight vector has a length of n. In our case, the loss function is min w f(X, y: w) + λσ(w) . (6) us, the standard deviation of w is used to minimize the loss function for w in order to select a specific range of values.

Literature Review
Recent years have witnessed a significant increase in the number of Android malware cyberattacks. On the other hand, there are substantial efforts by malware researchers and cybersecurity scholars to develop new reliable techniques in order to identify and mitigate the frequent development of these attacks. As a result, the automated Android malware detection (AMD) to deal with this critical cybersecurity challenge has increased too and cannot be neglected.
On the other hand, comprehensive AMD approaches have witnessed a significant increase in the use of ML and DL techniques to ensure the security of the Android ecosystem.
is section represents the most widely employed ML and DL approaches for Android malware detection.

Malware Detection Based on ML.
Several ML algorithms such as logistic regression (LR), random forest (RF), k-nearest neighbor (KNN), and support vector machine (SVM) have been used for Malware attack detection.
In [58], three ML classifiers, namely, KNN, RF, and DT were used for AMD on APK samples, which consisted of 300 benign samples and 183 malwares. e Dalvik opcode was extracted from the classes.dex file and then converted into an 8-bit grayscale image. e GIST descriptor was used later to extract the input attributes from the created images. e experimental results showed that RF provided better accuracy of 84.14%.
Li et al. [59] produced a lightweight model for AMD using the SVM algorithm on a dataset downloaded from Google Play store. e authors used less number of permissions for malware classification instead of using all the requested permissions, i.e., selected the top permissions that are more specific for benign and the top permissions for malware to build the malware detection system. Wang and Li [60] utilized three different ML algorithms, including NB, DT and K-nearest neighbors, for AMD. e feature selection and reduction techniques were used at the first stage to reduce the number of training features and to create a lightweight model with less number of features.
In the study by Massarelli et al. [20], the dynamic analysis was used to find the resource consumption metrics, including CPU, memory, and network usage, as input features of the training classifier. e SVM was utilized to identify several Android malware families on the Drebin dataset.
Chen et al. [61] proposed TinyDroid for AMD. e authors extracted the opcode sequence from Dalvik Executable files and then used the n-gram to extract the trained features from the opcode data. Four ML algorithms, RF, KNN, SVM, and NB, were used for the classification process to identify the malicious malware from normal APKs.
However, most of the aforementioned methods mainly used feature engineering in order to find the best features of the input data. However, selecting the best features is not an easy task, since the features that can work efficiently for one malware class are not necessarily important for other classes. Besides, the input data almost has a high degree of nonlinearity, and shallow learners have a poor ability to learn the complex and nonlinear structure of the data.

Malware Detection Based on DL.
In recent days, deep learning (DL) techniques have been conducted in several application domains, such as image processing and speech recognition [62]. e high potential of DL in several applications returns to its capability to extract the representation features from the input data automatically without any human intervention. It has the good capability to work in data, which has a high degree of nonlinearity, in contrast to shallow learners, almost experienced with high false alarms as they require hand-crafted features as input. e high performance of DL in intensive domain areas encourages many organizations and enterprises such as Facebook, Google, and Microsoft to deploy DL in various applications [63]. Researchers are also starting to leverage DL for cybersecurity tasks and malware detection as well.
Huang and Kao [64] proposed a new model, namely, R2-D2 for detecting the Android malware. e authors first obtained fixed size colored images from the classes.dex bytecode of the Android archive file. en, different network models based on the CNN algorithm were used for the Computational Intelligence and Neuroscience training and classification processes. A realistic dataset with more than 2 million of benign and malicious malware samples was collected in the period from January 2017 to August 2017 for the research work.
Hardy et al. [65] used the stacked autoencoders-(SAEs-) based DL model for malware detection. e model composed of two phases. In the first phase, unsupervised learning was used to extract the discriminatory features of the input data. e API calls extracted from the Portable Executable (PE) files were used as input features for the DL model. In the second stage, fine-tuning based on supervised learning was used to adapt the weights and offset vectors. A dataset collected from the Comodo Cloud Security Center is used for a comprehensive experimental study to compare various malware detection models.
Kim et al. [66] proposed an Android malware detection model using a multimodal deep learning method. Seven diverse features have been extracted from the unzipped APK, i.e., shared library, dex, and manifest files. e collected features are merged together to create a fixed feature vector. In the classification process, the DNN was used on malware samples produced from three different sources, i.e., VirusShare, MalGenome project, and Google Play app store.
e CNN with one convolutional layer followed by another softmax layer and one fully connected layer was used to detect samples of unknown malware families. e classifier approach has been applied on three different datasets, including MalGenome, Drebin, and merged datasets. While, API calls that appear in the DEX file were extracted for input attributes.
Nix and Zhang [68] investigated the CNN for Android application/malware classification. e code included within the classes.dex was examined to obtain API calls as an input attributes. e CNN approach was compared with LSTM and other n-gram-based methods on a dataset collected from the Contagio Mobile repository. e results showed that the CNN outperformed the other classifier techniques.
Suarez-Tangil et al. [3] proposed DroidSieve to classify the malware samples using a static solution. Several features have been used to identify the normal samples from the malicious malware, such as API calls, native code, invoked components, code structure, and permissions. e authors used Drebin and MalGenome datasets for their experimental evaluation. However, the reported results relied on the Drebin dataset during its large size and covered all MalGenome samples. e obtained results approved that the DroidSieve approach successfully achieved high accuracy when using resourcecentered features and reducing code analysis.
Along with dynamic features derived from an application's behavioral profile, such as method calls and intercomponent communication (ICC) intents, DroidCat [69] identified and classified Android malware. Using apps that have evolved over the last nine years, it classified them with 97% accuracy. It was able to defeat attacks that targeted system calls or sensitive APIs, as well as malware samples that used obfuscation schemes. It outperformed two stateof-the-art techniques in terms of detection accuracy, using MalGenome, Drebin, AndroZoo, and VirusShare datasets [70]. It relied on a variety of machine learning algorithms, including SVM, Naive Bayes, and RF. e RF with 128 trees outperformed all other methods. Because the dynamic malware analysis technique proposed by Ficco [71] is composed of a combination of generic and specialized detectors that are used throughout the analysis process, it is resistant to specific evasion techniques. To address malware evolution, the proposed technique utilized an alpha-count mechanism to investigate the effect of varying the length of the observation time window during run-time on the accuracy and speed of detectors. He demonstrated the technique's efficacy using data from 27 DREBIN families. Additionally, a second validation dataset, spanning the period June 2013 to March 2014, was used as a validation dataset taken from the VirusShare dataset.
In this research work, we propose an accurate and automated vision-based AMD model to deal with the critical cybersecurity challenges, which are difficult to ignore. A fine-tuned DL-based CNN algorithm is developed to efficiently detect malware attacks on Android OS.
On the Drebin dataset, we test several combinations and compare our approach to some state-of-the-art works, such as LeNet, Inception V3, ResNet50, Vgg16, EfficientNetB0, and SARVOTAM. All these methods are considered 2D convolution filter-based models. Also, we conduct extensive experiments and include the basic-1D-CNN with single and multistreams in our computations. e results indicate that the proposed ResNeXt achieved significant results in terms of accuracy and F1-score. In addition, the extensive computations of the ResNext model are significantly lower since it requires a smaller number of features to be analyzed compared to other methods. As a result, the modified ResNext demonstrates its effectiveness by quickly distinguishing Android malware from benign apps with the fewest recorded errors.

Materials and Methods
is section describes the methodology and the used dataset for our proposed model. e architecture and detailed explanation of the learning model are discussed in detail, considering the file size and other used parameters for the model tuning.

Dataset.
Most of the studies that have been published between the periods of 2014 and 2020 use the Drebin dataset for training and evaluating their developed models. It is considered one of the most widely used datasets for malware family classification purposes [21]. So, for that reason, it is used in this experiment setup. e Drebin dataset has the most popular Android malware families, which were collected in the period between August 2010 and October 2012. It contains more than 5,560 files belonging to 179 special malware families like Fake Installer, GoldDream [72], GingerMaster [73], DroidKungFu [74], and many others. Table 4 provides the outlines of different malware datasets that have been used by the research community. 8 Computational Intelligence and Neuroscience

Transforming Malware APK into Images.
e fundamental files considered for visualization in APK are classes.dex, resources, manifest, and certificates. In this work, these four types from the malware APK files are employed to extract the malware images, which are used for our model training.
First, the binaries are transformed into 8-bit vectors, and in the next stage, these vectors are converted to grayscale images. e detailed procedure is discussed. Initially, a malware substring consists of a sequence of numerous substrings where each substring is 8-bit long and is called a pixel. e 8-bit substring is converted to a decimal number in the next step, ranging from 0 to 255. Furthermore, all the malware substrings were transformed into a one-dimensional vector and converted to a two-dimensional matrix of a specific width. We called it a "malicious code matrix." is matrix is considered the two-dimensional grayscale image. e conversion process of APKs to grayscale images is shown in Figure 3. e width of the images was fixed based on the size of the APK files given in Table 5. Hence, the height also depends on the file size. CNN-based models require inputs to be of the same shape. erefore, instead of trying varying sizes of APK files, we use the dimensions proposed by [26]. e main reason behind the chosen sizes is to retain as much information as required along with keeping the size compact. However, it is empirically decided by [17,26]. erefore, to avoid the trial-and-error method for finding the proper sizes, this work follows their proposed procedure. A complete APK can be represented by grayscale images with an underlying structure that follows certain divisions. Fifteen different file structure combinations were used to generate the Drebin Android malware images, each containing at least one image of a distinct malware family. Some images constructed from the files are shown in Figure 4. Classes.dex (CL), AndroidManifest (AM), certificate (CR), and resources (RS) are among the files included.

Proposed Model.
In this work, we use the same ResNeXt classification model, which was proposed by Xie at el. [27] in order to categorize malware families. e basic idea behind ResNeXt is to use an aggregated residual block instead of the basic residual block. is strategy is called "split-transformmerge," and it was implemented in the inception architecture [27]. e inner product of a synthetic neural network is the weighted sum of the primary neurons in each layer, which is calculated for each layer separately. When viewed through the lens of equation (7), the inner product can be thought of as a type of aggregate transformation.
where w i represents the filter weight for the i th channel of the neuron, and x i describes the D-channel input vector of the neuron. A more inclusive function, which can perform as a network itself, has been developed by Xie at el. instead of a simple aggregating transformation [27]. ey demonstrated aggregated transformations as where t i (x) is an arbitrary function. Analogous to a simple neuron, here t i projects x into an (optionally, low-dimensional) embedding and then transforms it. C represents the size of the set of transformations to be aggregated, while Xie at el.' study used C to represent the cardinality. eir study claimed that the dimension of cardinality can control great numbers of complex transformations. Figure 5 [75] shows 32 cardinality blocks of ResNeXt.
e aggregated transformation in (8) serves as the residual function, as shown in (9).
ResNeXt is designed using ResNet's skip concept and cardinality with better accuracy than a wide and deep network. In experiments using the ImageNet dataset, ResNeXt outperformed existing models in terms of accuracy. Due to these advantages, we utilize the ResNeXt model   Computational Intelligence and Neuroscience 9 for malware image classification. e architecture of ResNeXt-50 is shown in Figure 6.
A new regularization technique was incorporated into our model in order to control individual weight values and the relationship between weight matrix entries. is is done by taking the weight matrix's standard deviation and multiplying it by λ to create an adaptive weight decay form. us, the regularizer prevents the learning model from taking values from the weight space that are too widely distributed. In fact, the new regularizer has been extensively tested on various tasks with different datasets and proved to be more effective than other regularization methods [57,[76][77][78][79][80].
Our model uses the new regularizer technique to control the relationship between entries using weight values from the weight matrix. To create a weight decay adaptive form, we multiplied the standard deviation of the weight matrix by λ. is reduces model complexity by removing unnecessary data and keeping only data that are useful for classification. e explained regularizer was tested extensively in different domains, including computer security, and provided better performance than the other regularization techniques.

Results
In this section, we briefly discuss the experimental setup and explain the classification results of the proposed approach.

Experimental Setup.
In this work, all experiments have been executed using Python programming language. Several

Experimental Results and Analysis.
In our work, the modified ResNext model with an embedded new regularization performed well for approximately 100 epochs. e simulation results were recorded for the Drebin dataset after converting the attributes of raw malware binary executable files to grayscale images. We compared our observed performance measures with various state-of-the-art models, which indicates that the performance of our model is higher (Figure 7). e evaluation is compared for various combinations of the image types as given in Table 7. e highest accuracy is achieved for the CR combination, as given in Table 7. As a result of the observations and simulation results, it is clear that the maximum amount of relevant information about malicious types is contained in the CR file, resulting in satisfactory classification performance. Apart from classification measures, Table 8 provides a time-based comparison for each combination used in the study and the number of images processed per second that belong to the corresponding class. e relative execution time is within a satisfactory range, which makes it possible to use it in real-time applications.
us, after training the model with high-quality classification measures, it can be used for testing in various applications. As given in Table 8, the average processing time for a single image is comparable to previous work [26]. Consequently, once integrated and deployed in software systems, the model's execution performance will be the same as the state-of-the-art method.
e new regularized technique was implemented in order to control individual weight values as well as the relationship between weight matrix entries in order to eliminate unnecessary data while selectively using only data useful for classification. is demonstrates the effectiveness of our model in extracting better features while also maintaining a reasonable overall running time. e detailed confusion matrix for the top 20 malware families is given in Table 9. Table 10 provides the results of family-specific classifications for the original ResNeXt and our modified ResNeXt. As observed, the new regularization method was adaptive in order to avoid overfitting and to improve the CNN's ability to predict whether a new observation of the data was not trained on the model. As a result, it enables a more adaptable method of weight loss. As a result, the regularizer prevents the learning model from using global values from the weight space as input.
is reduces the complexity of the model and removes unnecessary data, while keeping only the data that are useful for classification. As shown in Figure 8, the proposed model outperformed all the other methods of family-specific classification in terms of F1-score.

Malware Family Classification Performance Evaluation.
It has recently become a problem for machine learningbased malware classifiers to deal with the evolution of malware, which changes its malicious behavior over time, resulting in the deterioration of the classifiers. It has been suggested that deterioration [20,22] and model aging [17,21] are better terms to describe this issue of long-term sustainability. Sustainability is defined as the ability of the classifier to sustain its capabilities over time without frequent retraining. Recently, the sustainability challenge associated with machine learning-based malware detection has been discussed, but with limited investigation depth and solutions.
In the same context, the authors in [20,22] proposed and compared sustainability metrics with the five most recent Android malware detectors. Another study [81]   Computational Intelligence and Neuroscience Table  6: Various combinations and its associated instances used in the study. Computational Intelligence and Neuroscience     Computational Intelligence and Neuroscience outperformed five detectors in sustainability by employing a new behavioral profile for apps. In particular, the authors proposed DroidSpan, which surpassed the five detectors in terms of sustainability. However, their study was limited to malware detection and did not include any discussion of malware family classification. DroidEvolver [82] used a model pool with five linear online learning algorithms and delayed classifiers to perform the necessary updates. API-Graph [21] used API semantic similarity from an Android API relation graph to improve the latest malware classifiers. erefore, we propose a modified ResNext-based classification network with new regularization for Android malware family classification. Each Android application is distributed via an Android application package (APK). An APK contains multiple folders and files, each of which contains multiple sections; an APK contains multiple folders and files; and an APK contains multiple sections. Among other files and sections, we pay close attention to the AndroidManifest.xml file (AM), classes.dex file (CL), and the certificate files included with each malware sample (CR).

Computational Intelligence and Neuroscience
As a result of these sample characteristics, we chose the ResNeXt block because of its simplicity and performance. Following that, we modify ResNeXt to include a distinct block for each component (section or file) of a malware sample in order to account for the differences in characteristics between the components. A new regularization technique is utilized to improve the efficiency of malware family classification by extracting discriminatory features from the malware sample. is enables us to ultimately classify malware samples according to their correct families. e modified ResNeXt model is divided into two distinct phases: training and testing. During the training phase, it builds a prediction model using a set of labeled samples from the Drebin dataset.
en, the trained model is used to classify samples from the Drebin and AMD datasets during the testing phase. Specifically, the primary motivation and goal for the modified ResNeXt is to demonstrate that this model can improve classification performance once trained on an older dataset and predict new patterns of malware samples from a new dataset without having to retrain on new samples.
We addressed the issue of sustainability by assessing the model's performance when it is trained on the Drebin dataset (collected between 2010 and 2012) and predicting labels for other datasets such as the AMD dataset [10] (collected between 2010 and 2016). We selected the AMD dataset because it was amassed over a longer time period than the Drebin dataset. Our experiment revealed that the feature extraction model trained on the AMD dataset outperformed the model trained on the Drebin dataset in terms of overall performance. is is because the AMD dataset contains more variation information about malware samples than the Drebin dataset, which makes it more suitable to study the evolutionary patterns of malware.
In particular, we divided the samples into three different groups, each with their own set of samples. e first group is the Drebin dataset, where we separated the malware samples from the same year into training, validation, and test sets. e goal is to assess the performance of our model with training and testing malware samples collected in the same period of time. e second group is the AMD dataset. We selected 3,460 malware samples randomly (S-AMD). By doing so, we intend to test the capability of our model in classifying apps that have never been used in training. For the third group (T-AMD), we used the entire AMD dataset, in which we utilized malware samples from different time periods than the training set. e goal is to focus on evaluating the stability of our model performance when it is trained on older datasets and predicting the labels of newer ones, spanning one to four years. Figure 9 shows the experimental results.
In the first experiment, we compared the feature extraction model learned from the Drebin and AMD datasets (same period) to observe the performance of our model. It is clear from Table 11 that the model's generalization is better for Drebin than (S-AMD) and (T-AMD), which showed the suitability of the (S-AMD) and (T-AMD) sets in terms of containing more discriminatory features of malware samples. Next, we compared the accuracy of training and testing on the Drebin and the AMD datasets (same period and over-time). We observed that the accuracy of the Drebin dataset is better than that of the AMD dataset. is is because the Drebin dataset contains fewer malware families than the AMD dataset. In other words, the AMD dataset has sufficient variation  information about malware samples, which improves the generalization performance. us, the generalization performance improved when the variation information of malware samples in the AMD dataset was learned. Based on the results from Table 11, it was revealed that, even with a span of four years (the difference between Drebin and AMD datasets collection span), our model detection accuracy dropped noticeably over time from about 98% to below 80% in terms of accuracy for testing samples from year one. Over time, our model tended to be much more stable (with minimal fluctuation) in terms of detecting malware samples. It achieved an average accuracy of 87%, despite the evolution of Android malware. Despite the fact that our results are promising, we cannot claim that our model will continue to perform as well as it has in the case of future malware. e unpredictable evolution of our app in the future would also serve as a trigger for retraining our model in the future.
However, previous studies used a variety of different benchmarks casts doubt on the measurement degree of our findings' validity. As a result, despite the fact that we collected samples from a variety of sources, our datasets may not be representative of the app population during the pertinent years. Our findings and conclusions are best understood in light of the benchmarks we analyzed.

Discussion and Limitation
ere are numerous benefits to utilizing DL networks for malware family classification. e DL techniques have the capability to classify data automatically without the essential requirements of some expensive processes, such as decryption or reverse engineering. However, to successfully build a lightweight classification model and to avoid the high computational cost, the size of training features must be reduced to speed up the training and detection process.
e distribution of the discriminant information is controlled via the new regularizer by constraining the weight values' dispersion. In other words, the standard deviation of the weight matrix was used to obtain the regularization term and then multiplied by λ. e motivation is to develop a weight-decay adaptive form that helps the regularizer prevent the learning model from extracting values from the weight space that are widely distributed. us, it helps the model extract features that are effective for malware family classification.
us, the modified ResNeXt has the best classification performance among all the methods because we used a new regularization discriminant information distribution to eliminate unnecessary data and selectively use only data useful for classification. e solutions that were representing the malicious app behaviors using dynamic features (e.g., DroidSieve) suffered from the cost of tracing runtime and scalability, while our approach incurred runtime costs for testing per second.
Additionally, the overall accomplished results for the visual grayscale images may differ from those for the visual color images.
is is because color images contain more texture details and visualization features than those included in grayscale images. Also, the tested model used imbalanced Android malware samples for training and validating, so the models need to be tested on balanced Android malware samples. us, our proposed model avoided the computational needs of data augmentation and feature-engineering techniques. As a result, we successfully achieved better results and satisfied significant classification performance compared to other existing methods.

Conclusions
In this work, we proposed a modified ResNeXt model for the classification of android malware.
e ResNeXt is utilized due to its flexibility and requirement for low flops, coupled with a new regularization technique to improve the capability of the model in the classification of android malware. In the first step, various binary malware files from the Drebin dataset were transformed into 8-bit vectors based on the substrings. In the next step, these vectors are converted to grayscale images. For classification, we adopt a modified ResNeXt with skip concept and cardinality to enhance the detection performance. Furthermore, we embedded a new regularization technique to improve the classification detection rate. Different combinations of the images were used to fine-tune the model to look for those files having the most effect on the model. From simulation results, it is concluded that the certificate (CR) is the most suited feature, containing enough information to be used for the identification and classification of malware. We reported various highest measures, including accuracy, recall, precision, and F1 measures, obtained from using the CR images. 97.07% accuracy is observed, which is the highest accuracy so far achieved by using the Drebin dataset.
For intrinsic evaluation of our DL approach, the proposed model is compared with other state-of-the-art techniques, which widely use DL for classification purposes within the Android malware family. In the future, various models can be trained and studied to adopt a less complex model, while enhancing the performance further for the malware classification problem. In addition, when malware authors distribute each malware instance in both its simple and obfuscated forms concurrently, the images between the simple and obfuscated versions are likely to differ. So, utilizing only malware images may be ineffective in this case. A possible solution to this issue is to include another feature that is resistant to obfuscation, packing, and encryption attacks and then combine it with the malware image approach, for example, the extraction of code features from native app binaries and security-sensitive APIs, including reflection-based features.

Data Availability
e datasets used to support the findings of this study are included within the article.